﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AttributesExcercise
{
    class ApplyAttribute
    {
        [Version("1.0.0.1", "Early preview version")]
        public void Method1()
        { }

        [Version("2.0.0.0", "Final version of method")]
        public void Method123()
        {
            int i = new int();
            i = 5;
            i = i + i;
        }

        static void Main()
        {
            ApplyAttribute app = new ApplyAttribute();
            foreach (var method in app.GetType().GetMethods())
            {
                Console.WriteLine(method);
                foreach (var attribute in method.GetCustomAttributes(false))
                {
                    Console.WriteLine(attribute);
                }
            }
        }
    }
}
